local lieshijiexiehou = fk.CreateSkill{
    name = "ym_water__lieshijiexiehou",
    dynamic_desc = function (self, player, lang)
        local str = "每回合每项限一次，你可以发动："
        for index, skillName in ipairs(player:getTableMark("ym_water__lieshijiexiehou")) do
            local name = Fk:translate(skillName,"zh_CN")
            if not Fk.skills[skillName]:isEffectable(player) then
                name = name .. "<font color='red'>（已发动）</font>"
            end
            str = str .. index..".<a href=':"..skillName.."'><font color='#256781'>“".. name .. "”</font></a>" .. (index < 3 and "；" or "。")
        end
        str = str .. "<br>当你以此法对其他角色发动“结姻”后，你可将该项改为其一个与你所有技能时机均不相同或出牌阶段限次数的技能，然后删除“结姻”的性别或人称限制。"
        return str
    end,
}
Fk:loadTranslationTable{
    ["ym_water__lieshijiexiehou"] = "列世界邂逅",
    [":ym_water__lieshijiexiehou"] = "每回合每项限一次，你可以发动：1.“结姻”；2.“结姻”；3.“结姻”。<br>"..
    "当你以此法对其他角色发动“结姻”后，你可将该项改为其一个与你所有技能时机均不相同或出牌阶段限次数的技能，然后删除“结姻”的性别或人称限制。",
    ["#ym_water__lieshijiexiehou"] = "列世界邂逅：你可以将该项改为 %dest 的一个与你所有技能时机均不相同或出牌阶段限次数的技能",
    ["#ym_water__lieshijiexiehou_jieyin"] = "列世界邂逅：删除“结姻”的一条限制",

    ["$ym_water__lieshijiexiehou1"] = "旅途中的收获。",
    ["$ym_water__lieshijiexiehou2"] = "我会好好保存。",
    ["$ym_water__lieshijiexiehou3"] = "这个世界，也在回应我吗？",
}
lieshijiexiehou:addEffect(fk.SkillEffect,{
    can_trigger = function (self, event, target, player, data)
        if target == player and player:hasSkill(lieshijiexiehou.name) then
            return table.contains(player:getTableMark(lieshijiexiehou.name),data.skill.name)
        end
    end,
    on_cost = Util.TrueFunc,
    on_use = function (self, event, target, player, data)
        
    end,
})
lieshijiexiehou:addEffect(fk.AfterSkillEffect,{
    can_refresh = function (self, event, target, player, data)
        if target == player and player:hasSkill(lieshijiexiehou.name) then
            return table.contains(player:getTableMark(lieshijiexiehou.name),data.skill.name)
        end
    end,
    on_refresh = function (self, event, target, player, data)
        player.room:invalidateSkill(player, data.skill.name, "-turn", lieshijiexiehou.name)
    end,
})
lieshijiexiehou:addAcquireEffect(function (self, player, is_start)
    local room = player.room
    room:handleAddLoseSkills(player,"ym_water_lieshijiexiehou1__jieyin&|ym_water_lieshijiexiehou2__jieyin&|ym_water_lieshijiexiehou3__jieyin&",lieshijiexiehou.name,false,true)
    room:setPlayerMark(player,lieshijiexiehou.name,{"ym_water_lieshijiexiehou1__jieyin&","ym_water_lieshijiexiehou2__jieyin&","ym_water_lieshijiexiehou3__jieyin&"})
end)
lieshijiexiehou:addLoseEffect(function (self, player, is_death)
    local room = player.room
    if #player:getTableMark(lieshijiexiehou.name) > 0 then
        room:handleAddLoseSkills(player,"-"..table.concat(player:getTableMark(lieshijiexiehou.name),"|-"),lieshijiexiehou.name,false,true)
    end
    room:setPlayerMark(player,lieshijiexiehou.name,0)
end)

return lieshijiexiehou